<div class="widgets">
<ba-card title="">
    <div class="form col-sm-11">
        <div class="form-group row">
            <div class="col-sm-6">
                <div class="input-group">
                    <span class="input-group-addon" id="sizing-addon2"><i class="fa fa-search"></i>搜索</span>
                    <input type="text" class="form-control" placeholder="search" aria-describedby="sizing-addon2" [(ngModel)]="searchText">
                </div>
            </div>
        </div>
    </div>

    <div>
        <button class="btn btn-primary" (click)="onNew()">新增</button>
    </div>
</ba-card>

<ba-card title="">
    <driver-detail [driver]="selectedDriver" (onVoted)="getDrivers()"></driver-detail>
</ba-card>

<ba-card title="司机列表">
    <table class="table table-bordered table-hover">
        <thead>
            <th>ID</th>
            <th>司机姓名</th>
            <th>手机</th>
            <th>所属公司</th>
            <th>是否有效</th>
        </thead>
        <tbody>
            <tr *ngFor="let driver of drivers" [class.selected]="driver === selectedDriver" (click)="onSelect(driver)">
                <td>{{driver.driver_id}}</td>
                <td>{{driver.driver_name}} </td>
                <td>{{driver.driver_mobile}}</td>
                <td>{{driver.carrier_name}}</td>
                <td>{{driver.status}}</td>
            </tr>
        </tbody>
    </table>
</ba-card>
</div>
